<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="https://cdn.bootcss.com/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
	<!-- 
		ng-app="" -> 定义一个AngularJS应用程序 
		ng-model="" -> 把值绑定到应用程序(双向绑定)
		ng-bind="" -> 把应用程序数据绑定到HTML视图
		ng-init="xxx='xxx'" -> 初始化AngularJS应用程序变量
	-->

<!-- 	<div ng-app="">
		<p>myName: <input type="text" ng-model="myName" /></p>
		<h1>{{myName}}</h1>
	</div> -->
	<!-- <div ng-app="" ng-init="FN='Jack'">
		<p>姓名为：<span ng-bind="FN"></span></p>
		<p>姓名为：<span>{{FN}}</span></p>
	</div> -->

	<!-- 
		AngularJS模块定义了AngularJS应用
		AngularJS控制器用于控制AngularJS应用
	 -->
	 <!-- <div ng-app="myApp" ng-controller="myCtrl">
		姓：<input type="text" ng-model="firstName" />
		名：<input type="text" ng-model="secondName" />
		<p>姓名：{{firstName + "" + secondName}}</p>
	 </div>

	 <script type="text/javascript">
		var app = angular.module('myApp', []);

		app.controller('myCtrl', function($scope) {
			$scope.firstName = "石";
			$scope.secondName = "乐志";
		});
	 </script> -->
	<!-- <div ng-app="" ng-init="names=['jani','jack','kai']">
		<ul>
			<li ng-repeat="x in names">
				{{x}}
			</li>
		</ul>
	</div> -->
	<div ng-app="myApp">
		<fuck-sky></fuck-sky>
		<div fuck-sky></div>
		<div class="fuck-sky"></div>
	</div>
	<script type="text/javascript">
		var app = angular.module("myApp", []);

		app.directive("fuckSky", function() {
			return {
				restrict: "A",
				template: "<h1>自定义指令</h1><p>I am P行</p>"
			}
		})
	</script>
</body>
</html>